package com.hotel.reservation.service.impl;

import com.hotel.reservation.dao.RoomDao;
import com.hotel.reservation.po.RoomPo;
import com.hotel.reservation.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @version 0.1
 * @Author: oliver chen
 * @Description:
 * @Date:Create：in 2021/7/27 11:57
 * @Modified By：
 */
@Service("roomService")
public class RoomServiceImpl implements RoomService {
    @Autowired
    private RoomDao roomDao;
    @Override
    public List<RoomPo> selectAll() {
        return roomDao.selectAll();
    }

    @Override
    public RoomPo selectByRoomId(String roomId) {
       return roomDao.selectByRoomId(roomId);
    }

    @Override
    public List<RoomPo> selectByRoomState(int roomState) {
        return roomDao.selectByRoomState(roomState);
    }

    @Override
    public List<RoomPo> selectByRoomType(String roomType) {
        return roomDao.selectByRoomType(roomType);
    }

    @Override
    public List<RoomPo> selectAllRoomByPage(Map<String, Object> map) {
        return roomDao.selectAllRoomByPage(map);
    }

    @Override
    public Integer insertARoom(RoomPo roomPo) {
        return roomDao.insertARoom(roomPo);
    }

    @Override
    public Integer alterARoom(RoomPo roomPo) {
        return roomDao.alterARoom(roomPo);
    }

    @Override
    public Integer deleteARoom(String roomId) {
        return roomDao.deleteARoom(roomId);
    }

    @Override
    public Integer deleteRooms(List<String> roomIds) {
        return roomDao.deleteRooms(roomIds);
    }

    @Override
    public List<RoomPo> selectEnableRooms(int roomState, String roomType) {
        return roomDao.selectEnableRooms(roomState,roomType);
    }
}
